package org.example.book.bridge.abst;

import org.example.book.bridge.RegisterLoginFuncInterface;
import org.example.book.pojo.UserInfo;

import javax.servlet.http.HttpServletRequest;

public class RegisterLoginComponent extends AbstractRegisterLoginComponent{

    public RegisterLoginComponent(RegisterLoginFuncInterface registerLoginFuncInterface) {
        super(registerLoginFuncInterface);
    }

    @Override
    protected String login(String username, String password) {
        return registerLoginFuncInterface.login(username, password);
    }

    @Override
    protected String register(UserInfo userInfo) {
        return registerLoginFuncInterface.register(userInfo);
    }

    @Override
    protected boolean checkExists(String username) {
        return registerLoginFuncInterface.checkExists(username);
    }

    @Override
    protected String login3rd(HttpServletRequest request) {
        return registerLoginFuncInterface.login3rd(request);
    }
}
